<?php

namespace App\Handlers;
use Cache;

class ShareUrlHandler
{
    protected $cache_tags = 'share_urls';
    public function get($key, $data = null)
    {
        if($data) {
            Cache::tags($this->cache_tags)->put($key, $data, 10);
        } else {
            $data = Cache::tags($this->cache_tags)->get($key);
        }
        return $data;
    }
}
